home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / strategy / xpuzzles.3 / xpuzzles / xpuzzles-5.3.1 / xmlink / Makefile.std < prev    next >
Makefile  |  1996-02-05  |  3KB  |  159 lines

  1. # X-BASED MISSING LINK(tm)
  2. #
  3. #    Makefile.std
  4. #
  5. ###
  6. #
  7. #  Copyright (c) 1994 - 96    David Albert Bagley, bagleyd@hertz.njit.edu
  8. #
  9. #                   All Rights Reserved
  10. #
  11. #  Permission to use, copy, modify, and distribute this software and
  12. #  its documentation for any purpose and without fee is hereby granted,
  13. #  provided that the above copyright notice appear in all copies and
  14. #  that both that copyright notice and this permission notice appear in
  15. #  supporting documentation, and that the name of the author not be
  16. #  used in advertising or publicity pertaining to distribution of the
  17. #  software without specific, written prior permission.
  18. #
  19. #  This program is distributed in the hope that it will be "playable",
  20. #  but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  22. #
  23.  
  24. # Set your C compiler
  25. #CC        = gcc
  26. CC        = cc
  27. #CC        = acc
  28.  
  29. LINT        = lint
  30. #LINT        = alint
  31.  
  32. # Set your print command
  33. PRINT        = lpr
  34. #PRINT        = enscript -2r
  35.  
  36. # X include files
  37. XINC        = -I/usr/local/include
  38. #XINC        = -I/usr/include/X11R4
  39. #XINC        = -I/usr/include/X11R5
  40. #XINC        = -I${OPENWINHOME}/include
  41. #XINC        = -I${MOTIFHOME}/include
  42.  
  43. # X libraries
  44. XLIBPATH    = -L/usr/local/lib
  45. #XLIBPATH    = -L/usr/lib/X11R4
  46. #XLIBPATH    = -L/usr/lib/X11R5
  47. #XLIBPATH    = -L${OPENWINHOME}/lib
  48. #XLIBPATH    = -L${MOTIFHOME}/lib
  49.  
  50. # to use Motif (xm), uncomment
  51. # XM include path, below is a guess
  52. #XMINC        = -I/usr/local/include
  53. #
  54. # XM library, the path is a guess
  55. #XMLIB        = -L/usr/local/lib -lXm
  56. #XMLIB        = -lXm
  57.  
  58. wIDGET        = mlink
  59. WIDGET        = Mlink
  60.  
  61. SCOREFILE    = ./${wIDGET}.scores
  62. DATAFILE    = ./${wIDGET}.data
  63.  
  64. XPROGRAM    = x${wIDGET}
  65. XMPROGRAM    = xm${wIDGET}
  66. VER        = x${wIDGET}
  67.  
  68. COPT        = -O
  69.  
  70. DEFINES        = ${XMDEF}\
  71.      -DSCOREFILE=\"${SCOREFILE}\" -DDATAFILE=\"${DATAFILE}\"
  72.  
  73. INCLUDES    = ${XMINC} ${XINC}
  74.  
  75. CFLAGS        = ${COPT} ${DEFINES} ${INCLUDES}
  76.  
  77. LIBS        = ${XLIBPATH} ${XMLIB} -lXt -lX11
  78.  
  79. HDRS=\
  80.         ${WIDGET}.h\
  81.         ${WIDGET}P.h
  82. SRCS=\
  83.         rngs.c\
  84.         ${WIDGET}.c\
  85.         ${WIDGET}U.c
  86. OBJS=\
  87.         rngs.o\
  88.         ${WIDGET}.o\
  89.         ${WIDGET}U.o
  90.  
  91. #OBJS        = ${SRCS:.c=.o}
  92.  
  93.  
  94. all:    ${OBJS} ${XPROGRAM}.o
  95.     ${CC} -o ${XPROGRAM} ${OBJS} ${XPROGRAM}.o ${LIBS}
  96.  
  97. all.xm:    ${OBJS} ${XMPROGRAM}.o
  98.     ${CC} -o ${XMPROGRAM} ${OBJS} ${XMPROGRAM}.o ${LIBS}
  99.  
  100. ${WIDGET}.o:    ${WIDGET}P.h ${WIDGET}.h
  101.  
  102. ${WIDGET}U.o:    ${WIDGET}P.h ${WIDGET}.h
  103.  
  104. ${XPROGRAM}.o:    ${WIDGET}.h
  105.  
  106. ${XMPROGRAM}.o:    ${WIDGET}.h
  107.  
  108. debug:    all
  109. debug:=COPT=-g -DDEBUG -Wall
  110.  
  111. lint:
  112.     ${LINT} -ax -DLINT ${DEFINES} ${INCLUDES} ${SRCS}\
  113.     ${XPROGRAM}.c ${XMPROGRAM}.c
  114.  
  115. run:
  116.     ./${XPROGRAM}
  117.  
  118. run.xm:
  119.     ./${XMPROGRAM}
  120.  
  121. clean:
  122.     rm -f *.o ${XPROGRAM} ${XMPROGRAM} core *~ *% *.bak make.log MakeOut
  123.  
  124. clean.all:    clean
  125.     rm -f Makefile
  126.  
  127. tar:    clean.all
  128.     cd .. ; tar cvf ${VER}.tar ${VER}/${WIDGET}.h ${VER}/${WIDGET}P.h\
  129.         ${VER}/${WIDGET}.c ${VER}/${XPROGRAM}.c ${VER}/${WIDGET}U.c\
  130.         ${VER}/README ${VER}/${wIDGET}.xbm ${VER}/${WIDGET}.ad\
  131.         ${VER}/Imakefile ${VER}/Makefile.std ${VER}/${VER}.man\
  132.         ${VER}/${wIDGET}.scores ${VER}/make.com ${VER}/rngs.c\
  133.         ${VER}/mouse-l.xbm ${VER}/mouse-r.xbm ${VER}/${XMPROGRAM}.c
  134.  
  135. compress:    tar
  136.     cd .. ; compress -f ${VER}.tar
  137.  
  138. gzip:    tar
  139.     cd .. ; gzip -f ${VER}.tar
  140.  
  141. tgz:    tar
  142.     cd .. ; gzip -c ${VER}.tar > `echo ${VER} | cut -c1-8`.tgz ;\
  143.         rm -f ${VER}.tar
  144.  
  145. read:
  146.     more README
  147.  
  148. man:
  149.     nroff -man ${VER}.man | more
  150.  
  151. print:
  152.     ${PRINT} ${HDRS} ${SRCS}
  153.  
  154. install:    all
  155.     install ${XPROGRAM} /usr/local/bin
  156.  
  157. install.xm:    all
  158.     install ${XMPROGRAM} /usr/local/bin
  159.